<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html>
 <head>
  <title>inputEx - IntegerField Usage</title>

<!-- YUI CSS -->
<link rel="stylesheet" type="text/css" href="../lib/yui/reset-fonts/reset-fonts.css">
<link rel="stylesheet" type="text/css" href="../lib/yui/container/assets/container.css"> 
<link rel="stylesheet" type="text/css" href="../lib/yui/assets/skins/sam/skin.css">

<!-- InputEx CSS -->
<link type='text/css' rel='stylesheet' href='../css/inputEx.css' />
<!--[if IE 6]><link type='text/css' rel='stylesheet' href='../css/inputEx-IE6.css' /><![endif]-->

<!-- Demo CSS -->
<link rel="stylesheet" type="text/css" href="css/demo.css"/>
<link rel="stylesheet" type="text/css" href="css/dpSyntaxHighlighter.css">

 </head>

 <body>

<h1>inputEx - IntegerField Usage</h1>

<!-- Example 1 -->
<div class='exampleDiv'>
	<h2>Basic IntegerField creation</h2>
	<p>Use the following code to create a basic inputEx IntegerField.</p>
	<div class='demoContainer' id='container1'></div>
	<div id='valueContainer1'></div>
	<div class='codeContainer'>
		<textarea name="code" class="JScript">
			var field = new inputEx.IntegerField({parentEl: 'container1', showMsg: true});
			field.updatedEvt.subscribe(function(e, params) {
				YAHOO.util.Dom.get('valueContainer1').innerHTML = "value: "+params[0]+", type: "+typeof(params[0]);
			});
		</textarea>
	</div>
</div>

<!-- Example 2 -->
<div class='exampleDiv'>
	<h2>IntegerField with options</h2>
	<p>Test IntegerField with more options.</p>
	<div class='demoContainer' id='container2'></div>
	<div id='valueContainer2'></div>
	<div class='codeContainer'>
		<textarea name="code" class="JScript">
			var field = new inputEx.IntegerField({parentEl: 'container2', showMsg: true, required:true, typeInvite:"Enter a number"});
			field.updatedEvt.subscribe(function(e, params) {
				YAHOO.util.Dom.get('valueContainer2').innerHTML = "value: "+params[0]+", type: "+typeof(params[0]);
			});
		</textarea>
	</div>
</div>


<!-- Example 3 -->
<div class='exampleDiv'>
	<h2>Negative values</h2>
	<p>Set the negative attribute to true if you allow negative values.</p>
	<div class='demoContainer' id='container3'></div>
	<div class='codeContainer'>
		<textarea name="code" class="JScript">
			new inputEx.IntegerField({parentEl: 'container3', showMsg: true, required:true, negative:true});
		</textarea>
	</div>
</div>


<!-- Example 4 -->
<div class='exampleDiv'>
	<h2>Min &amp; Max</h2>
	<p>Check values are within a range</p>
	<div class='demoContainer' id='container4'></div>
	<div class='codeContainer'>
		<textarea name="code" class="JScript">
			new inputEx.IntegerField({parentEl: 'container4', showMsg: true, min:3, max:10, typeInvite:"Integers between 3 and 10 only", size:30});
		</textarea>
	</div>
</div>

<!-- YUI Library -->
<script type="text/javascript" src="../lib/yui/utilities/utilities.js"></script>
<script type="text/javascript" src="../lib/yui/container/container-min.js"></script>


<!-- InputEx -->
<script src="../js/inputex.js"  type='text/javascript'></script>
<script src="../js/Field.js"  type='text/javascript'></script>
<script src="../js/fields/StringField.js"  type='text/javascript'></script>
<script src="../js/fields/IntegerField.js"  type='text/javascript'></script>

<!-- inputEx examples -->
<script src="js/dpSyntaxHighlighter.js"></script>
<script src="inputex-examples.js"></script>

 </body>
</html>